import React, { Component } from 'react'

import eventBus from './utils/event-bus'

export class HomeBanner extends Component {

  prevClick () {
    console.log('上一个');
    eventBus.emit('prev', 'jack', 12)
  }
  nextClick () {
    console.log('下一个');
    eventBus.emit('next')
  }
  render () {
    return (
      <div>
        <p>HomeBanner</p>
        <button onClick={() => this.prevClick()}>上一个</button>
        <button onClick={() => this.nextClick()}>下一个</button>
      </div>
    )
  }
}

export default HomeBanner